import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:honeypotflutter/public/views/public_appBar.dart';
import 'package:honeypotflutter/public/views/public_scrollView.dart';
import 'package:honeypotflutter/publicBussine/bussine_colors.dart';
import 'package:honeypotflutter/publicBussine/bussine_font.dart';
import 'package:honeypotflutter/publicBussine/bussine_image.dart';
import 'package:honeypotflutter/publicBussine/view/bussine_button.dart';
import 'logic.dart';

class RechargeFailPage extends StatefulWidget {
  const RechargeFailPage({Key? key}) : super(key: key);

  @override
  State<RechargeFailPage> createState() => _RechargeFailPageState();
}

class _RechargeFailPageState extends State<RechargeFailPage> {
  final Recharge_failLogic logic = Get.put(Recharge_failLogic());

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: MGColors.whileColor,
      appBar: HLAppBar(
        navigationTitle: "失败成功",
        showBackLeading: false,
        showBottomLine: true,
      ),
      body: HLScrollView(
        crossAxisAlignment: CrossAxisAlignment.center,
        children: [
          Container(
            padding: EdgeInsets.only(top: 40),
            child: Image.asset(
              MGImage.image("public_fail"),
              width: 80,
              height: 80,
            ),
          ),
          Container(
            width: double.infinity,
            margin: EdgeInsets.only(top: 20, bottom: 20),
            child: Text(
              "充值失败",
              textAlign: TextAlign.center,
              style: TextStyle(
                fontSize: MGFont.titleFont2,
                color: MGColors.text1Color,
                fontWeight: FontWeight.bold,
              ),
            ),
          ),
          Text(
            "支付遇到点问题,请重新支付~",
            style: TextStyle(
              fontSize: MGFont.textFont1,
              color: MGColors.text3Color,
            ),
          ),
          SizedBox(height: 30),
          MGButton(
            title: "继续充值",
            backColor: Colors.transparent,
            margin: EdgeInsets.only(left: 30, right: 30),
            buttonAction: () {
              Get.back();
            },
          )
        ],
      ),
    );
    ;
  }

  @override
  void dispose() {
    Get.delete<Recharge_failLogic>();
    super.dispose();
  }
}
